<template>
  <a-tag
    v-for="(item, idx) in statusList"
    v-show="item.name === name"
    :key="idx"
    :color="item.color"
  >
    {{ item.desc }}
  </a-tag>
</template>

<script lang="ts" setup>
  import { PropType } from 'vue/dist/vue';
  import { CommonEnum } from '@/types/global-business';

  defineProps({
    source: {
      type: String,
      default() {
        return 'table';
      },
    },
    name: {
      type: String,
      default() {
        return 'table';
      },
    },
    statusList: {
      type: Array as PropType<CommonEnum[]>,
      default() {
        return [];
      },
    },
  });
</script>

<style scoped lang="less">
  .container-breadcrumb {
    margin: 16px 0;

    :deep(.arco-breadcrumb-item) {
      color: rgb(var(--gray-6));

      &:last-child {
        color: rgb(var(--gray-8));
      }
    }
  }
</style>
